package inter.impl.bean;

import inter.bean.Sauce;

/**
 * @program: designModel
 * @description: 烧饼酱
 * @author: liuxincheng
 * @create: 2019-04-02 09:04
 */
public class ShaoBingSauce implements Sauce {

    private String name = null;

    public ShaoBingSauce(String type) {
        switch (type) {
            case "tomato":
                this.name = "蕃茄酱";
                break;
            case "potato":
                this.name = "土豆酱";
                break;
            case "porkLiver":
                this.name = "猪肝酱";
                break;
        }
        System.out.println("创建" + this.getName());
    }

    @Override
    public String getName() {
        return this.name;
    }
}
